package com.tarena.lbs.content.service.impl;

import com.tarena.lbs.base.protocol.pager.PageResult;
import com.tarena.lbs.content.dao.repository.CategoryRepository;
import com.tarena.lbs.content.pojo.param.ArticleCategoryParam;
import com.tarena.lbs.content.pojo.vo.ArticleCategoryVO;
import com.tarena.lbs.content.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CategoryServiceImpl implements CategoryService {
    private final CategoryRepository categoryRepository;
    @Autowired
    public CategoryServiceImpl(CategoryRepository categoryRepository) {
        this.categoryRepository = categoryRepository;
    }
    public PageResult<ArticleCategoryVO> pageList() {
        return categoryRepository.pageList();
    }

    public void insert(ArticleCategoryParam articleCategoryParam) {
        categoryRepository.save(articleCategoryParam);
    }
}
